package com.example.business_oa.service;

import com.example.comment_oa.dubbo.ChaQitaDubbo;
import com.example.comment_oa.dubbo.ChaWuXianYiJinDubbo;
import com.example.comment_oa.pojos.xinzi.JibenQitajine;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChaQitaService {
    @DubboReference(version = "1.0.0")
    ChaQitaDubbo chaQitaDubbo;

    @GlobalTransactional(timeoutMills = 300000)
    public int insertQita(JibenQitajine jibenQitajine){
       return   chaQitaDubbo.insertQita(jibenQitajine);
    }

    @GlobalTransactional(timeoutMills = 300000)
    public List<JibenQitajine> selectOnePerson(String jibenId,String gonghao){
        List<JibenQitajine> jibenQitajines = chaQitaDubbo.selectOnePerson(jibenId, gonghao);
        return  jibenQitajines;
    }
}

